package com.itqf.controller;

import com.itqf.entity.SysUser;
import com.itqf.service.SysMenuService;
import com.itqf.service.SysUsersService;
import com.itqf.utils.R;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 徐老板
 * @date 2020/2/1   11:52
 */
@Controller
public class TestController {

    @Resource
    SysUsersService sysUsersService;
    @Resource
    SysMenuService sysMenuService;

//    @RequiresPermissions("sys:user:info")
    @RequestMapping("/sys/test")
    private List test(){
        List<SysUser> all = sysUsersService.findAll();
        return all;
    }

//    @RequestMapping("sys/menu/user")
    private R getMenu(){
        R userMenu = sysMenuService.findUserMenu();
        return userMenu;

    }
}
